home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / uobj.com / UOBJ.P < prev    next >
Encoding:
Text File  |  1990-01-10  |  865 b   |  39 lines

  1. unit UObj;                {Object Pascal Version}                 {90/01/08}
  2. {
  3.    This unit contains the TObj class and was written to:
  4.  
  5.      1) provide a "better" base object for Turbo Pascal programmers
  6.      2) enhance portability between Object Pascal and Turbo Pascal (MS/DOS)
  7.      3) provide the standard base object to Quick Pascal programmers
  8.  
  9.    Author: Mike Babulic                   Compuserve: 72307,314
  10.            3827 Charleswood Dr. N.W.
  11.            Calgary, Alberta
  12.            Canada
  13.            T2L 2C7
  14. }
  15. interface
  16.  
  17. uses
  18.     ObjIntf;
  19.  
  20. type
  21.     TObj = object(TObject)
  22.             function Bytes: LongInt;
  23.             function TypeOf: Integer;
  24.         end;
  25.  
  26.  
  27. implementation
  28.  
  29. function TObj.Bytes: LongInt;
  30.     begin
  31.         Bytes := GetHandleSize(Handle(self))
  32.     end;
  33.  
  34. function TObj.TypeOf: Integer;
  35.     begin
  36.         TypeOf := integer(handle(self)^^);
  37.     end;
  38.  
  39. end.